#ifndef S401MODEL_H
#define S401MODEL_H

#include <QAbstractItemModel>
#include <QObject>
#include <QString>
#include <QModelIndex>

class S401Model : public QAbstractListModel
{
    Q_OBJECT

public:
    explicit S401Model(QObject *parent = nullptr);

    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;

    QHash<int, QByteArray> roleNames() const override;

private:

    struct Data{
            QString title_;
            QString content_;
            bool select_;
        };

        QList<Data> dataList_;
        enum DataRoles{
            TitleRole = Qt::UserRole + 1,
            ContentRole,
            SelectRole,
        };
};

#endif // S401MODEL_H
